/*    */ package eos.moe.dragoncore.mixins;
/*    */ 
/*    */ import com.google.gson.Gson;
/*    */ import eos.moe.dragoncore.data.SignData;
/*    */ import eos.moe.dragoncore.renderer.SignRenderer;
/*    */ import net.minecraft.block.BlockWallSign;
/*    */ import net.minecraft.block.state.IBlockState;
/*    */ import net.minecraft.tileentity.TileEntity;
/*    */ import net.minecraft.tileentity.TileEntitySign;
/*    */ import net.minecraft.util.math.AxisAlignedBB;
/*    */ import net.minecraft.util.math.BlockPos;
/*    */ import net.minecraft.world.IBlockAccess;
/*    */ import org.spongepowered.asm.mixin.Mixin;
/*    */ import org.spongepowered.asm.mixin.injection.At;
/*    */ import org.spongepowered.asm.mixin.injection.Inject;
/*    */ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
/*    */ 
/*    */ @Mixin({BlockWallSign.class})
/*    */ public class MixinBlockSign {
/* 20 */   private static final Gson gson = new Gson();
/*    */   
/*    */   @Inject(method = {"getBoundingBox"}, at = {@At("HEAD")}, cancellable = true)
/*    */   public void getBoundingBox(IBlockState iBlockState, IBlockAccess iBlockAccess, BlockPos blockPos, CallbackInfoReturnable callbackInfoReturnable) {
/* 24 */     TileEntity tileEntity = iBlockAccess.func_175625_s(blockPos);
/* 25 */     if (tileEntity instanceof TileEntitySign) {
/* 26 */       TileEntitySign tileEntitySign = (TileEntitySign)tileEntity;
/* 27 */       if (tileEntitySign.field_145915_a.length <= 1)
/*    */         return; 
/* 29 */       if (tileEntitySign.field_145915_a[1] == null)
/*    */         return; 
/* 31 */       String str = tileEntitySign.field_145915_a[1].func_150254_d();
/* 32 */       SignData signData = SignRenderer.getSignData(str);
/* 33 */       if (signData == null) {
/*    */         return;
/*    */       }
/* 36 */       if (signData.getModel() == null) {
/*    */         return;
/*    */       }
/* 39 */       AxisAlignedBB axisAlignedBB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
/*    */       
/* 41 */       callbackInfoReturnable.setReturnValue(axisAlignedBB);
/*    */     } 
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\mixins\MixinBlockSign.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */